home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Camelot
/
Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].zip
/
Camelot 098 (1990-12)(Swedish User Group of Amiga)(SE)(PD)[WB].adf
/
XLisp-Stat
/
Book
/
boxcox.lsp
< prev
next >
Wrap
Lisp/Scheme
|
1990-10-11
|
667b
|
27 lines
; book pp.298-299
(require "data/tutorial")
(let ((ranks (rank precipitation)))
(setf nq (normal-quant (/ (+ ranks 1) 31))))
(defun bc (x p)
(let* ((bcx (if (< (abs p) .0001)
(log x)
(/ (^ x p) p)))
(max (max bcx))
(min (min bcx)))
(/ (- bcx min) (- max min))))
(setf pl (plot-points nq (bc precipitation 1)))
(setf indices (iseq 30))
(defun change-power (p)
(send pl :point-coordinate 1 indices (bc precipitation p))
(send pl :redraw-content))
(send pl :abline .5 .25)
(setf slider (interval-slider-dialog '(-1 2) :action #'change-power))
(send slider :value 1)
(send pl :add-subordinate slider)